package com.gadgets.framework.controller;

import com.gadgets.framework.common.dto.HttpBaseResp;
import com.gadgets.framework.thread.basic.ThreadPoolConfiguration;
import com.gadgets.framework.thread.pool.GadgetsThreadPool;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author UncleXiu
 * @version V1.0.0
 * @data 2021-06-01
 * @moduel gadgets
 * 
 */
@RestController
@RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST,org.springframework.web.bind.annotation.RequestMethod.GET},value = "/threadMonitor")
public class ThreadMonitorController {

    /**
     * 监控线程池模块注册信息
     * @return      查询结果
     */
    @RequestMapping(method = {org.springframework.web.bind.annotation.RequestMethod.POST,org.springframework.web.bind.annotation.RequestMethod.GET},value = "/configration.do")
    public HttpBaseResp<ThreadPoolConfiguration> configurationMonitor(){
        return new HttpBaseResp<>(GadgetsThreadPool.getModuelConfiguration(),null);
    }

}
